package com.zxn.kotlin.entity

/**
 * 实体类中高阶函数的使用示例:无法达到预期的效果.
 */
class Entity {


    fun onIntent(intent: String,blcok:(Int) -> Unit) {
        val length = intent.length
        blcok(length)
    }

    fun onParseIntent(userId: Int) {
        println("userId1:$userId")
    }

    fun onGetIntent(userId: Int) {
        println("userId2:$userId")
    }
}